home *** CD-ROM | disk | FTP | other *** search
- Short: Processing stacksize in cli-scripts
- Author: Thomas.Radtke@rz.uni-osnabrueck.de
- Uploader: Thomas.Radtke@rz.uni-osnabrueck.de
- Type: util/batch
-
- This command lets you process the stacksize in cli-scripts. If the
- numeric argument given to it is lower than the actual stacksize, it
- will exit with value 5.
-
- Usage:
-
- syntax: stacksize n
- returncode: 5 if stacksize is lower than n, or if n is missing
- 0 if stacksize is higher or equal to n
-
- Example: You want to start a command in a batch file wich will use
- 20KB of stack. Normally you are using 4KB of stack, but maybe the user
- has raised the size to 300KB to start e.g. maple from the shell, you don't
- know. Setting the stack at this point to 20KB will be deadly for the
- one really starting maple after executing your batch file. To avoid
- such problems, you could now use the following script:
-
- ; This example raises the stacksize only if it ranges below a critical
- ; value
-
- stacksize 20480 ; request the return code
- if warn ; stack was lower than 20KB ?
- stack 20480 ; yes, raise the stack
- endif
-
- Installation: Just move or copy bin/stacksize anywhere in your path,
- e.g. cp bin/stacksize c:
-
- The source can be found in the src directory.
-
- Legal: stacksize is freeware, you can redistribute the archive as
- long as the files 'stacksize' and 'stacksize.readme' are intact.
-
- Thomas
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 5532 2822 48.9% 08-Sep-95 03:56:10 +stacksize
- 256 171 33.2% 08-Sep-95 03:56:10 +stacksize.c
- 1386 693 50.0% 08-Sep-95 03:56:10 +stacksize.readme
- -------- ------- ----- --------- --------
- 7174 3686 48.6% 09-Sep-95 03:21:18 3 files
-